package my.headfirstjava.observer.v2;

/**
 * author: xl
 * time: 2018/8/23 9:43
 * description:
 **/
public class CurrentWeather implements Observer,Display {


    @Override
    public void update(WeatherData msg) {
        display(msg);
    }


    @Override
    public void display(WeatherData msg) {
        System.out.println("当前天气，温度:"+msg.getWendu());
        System.out.println("当前天气，湿度:"+msg.getShidu());
        System.out.println("当前天气，气压:"+msg.getQiya());
    }
}
